<!--
// +----------------------------------------------------------------------
// | Created by PHPstorm: JRKAdmin框架 [ JRKAdmin ]
// +----------------------------------------------------------------------
// | Copyright (c) 2019~2022 [LuckyHHY] All rights reserved.
// +----------------------------------------------------------------------
// | SiteUrl: http://www.luckyhhy.cn
// +----------------------------------------------------------------------
// | Author: LuckyHhy <jackhhy520@qq.com>
// +----------------------------------------------------------------------
// | Date: 2020/1/3-16:21
// +----------------------------------------------------------------------
// | Description:
// +----------------------------------------------------------------------
*-->
{extend name='public/base' /}


{block name="content"}

<div class="layui-col-md12">

    <div class="layui-card">

        <div class="layui-card-body">

            <div class="layui-card-header">安全设置</div>
            <div class="layui-card-body" >

                <div class="layui-form" lay-filter="">

                    <?php  $al=GetSysConfig('admin_log'); $so=GetSysConfig('site_open');?>
                    <div class="layui-form-item">
                        <label class="layui-form-label">后台日志：</label>
                        <div class="layui-input-block">
                            <input type="radio" name="admin_log" value="1" title="开启" {eq name="$al" value="1"} checked {/eq}>
                            <input type="radio" name="admin_log" value="2" title="关闭" {eq name="$al" value="2"} checked {/eq}>
                        </div>
                        <div class="layui-form-mid  layui-text text-success">提示：是否启用后台管理操作日志。</div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">网站开启：</label>
                        <div class="layui-input-block">
                            <input type="radio" name="site_open" value="1" title="开启" {eq name="$so" value="1"} checked {/eq}>
                            <input type="radio" name="site_open" value="2" title="关闭" {eq name="$so" value="2"} checked {/eq}>
                        </div>
                        <div class="layui-form-mid  layui-text text-success">提示：是否开启网站。</div>
                    </div>

                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">禁止登陆IP：</label>
                        <div class="layui-input-block">
                                <textarea name="forbid_ip" placeholder="匹配ip段用'*'占位，如192.168.'*',多个ip段用英文逗号','分割" class="layui-textarea">
                                    {:GetSysConfig('forbid_ip')}
                                </textarea>
                            <div class="layui-form-mid  layui-text text-danger">提示：匹配ip段用"*"占位，如192.168."*",多个ip段用英文逗号","分割。</div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit="" lay-filter="set_website">确认保存</button>
                        </div>
                    </div>

                </div>

            </div>


        </div>
    </div>

</div>


{/block}

{block name="js"} <!--js处理区-->

<script>

    layui.use(['element','form', 'jquery','lucky'], function () {
        var element = layui.element;
        var form = layui.form;
        var $ = layui.jquery;
        var lucky=layui.lucky;

        form.render();

        /**
         * 表格提交
         */
        form.on('submit(set_website)', function (data) {
            lucky.FormSubmit("{:url('setting/safe')}",data.field);
            return false;
        });

    });

</script >


{/block}
